package com.atguigu.gmall.list.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.list.client.fallback.ListFeignClientFallBack;
import com.atguigu.gmall.list.model.SearchParam;
import com.atguigu.gmall.list.model.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author gsy
 * @date 2021年09月03日20:27
 * Description
 */
@FeignClient(value = "service-list",fallback = ListFeignClientFallBack.class)
public interface ListFeignClient {
    //增加热度评分
    @PostMapping("/api/list/incrHotScore/{skuId}/{score}")
    Result incrHotScore(
            @PathVariable Long skuId,
            @PathVariable Integer score);
    //根据查询参数对象查询商品列表
    @PostMapping("/api/list")
    SearchResponseVo search(@RequestBody SearchParam searchParam);
}
